<?php

namespace app\index\controller;

use app\common\exception\System as SystemException;
use app\common\exception\User as UserException;

/**
 * 合伙人
 * Class Partner
 * @package app\index\controller
 */
class Partner extends Common
{
    public function apply()
    {
        if (!$this->auth->member_id) {
            return $this->errorReturn(UserException::E_NOT_LOGIN, UserException::$messageList[UserException::E_NOT_LOGIN]);
        }

        $type = $this->request->get('type', 1);
        $name = $this->request->get('name', '');
        $id_card = $this->request->get('id_card', '');
        $phone = $this->request->get('phone', '');
        $area = $this->request->get('area', '');
        $industry = $this->request->get('industry', '');
        $equity = $this->request->get('equity', '');
        $pay_type = $this->request->get('pay_type', '');

        $creat_time = time();

        if (!in_array($type, [1, 2, 3])) {
            return $this->errorReturn(UserException::E_PARTNER_TYPE_ERROR, UserException::$messageList[UserException::E_PARTNER_TYPE_ERROR]);
        }
    }
}